﻿//----------------------------------------------------------------
// Desc: 
// Edit: ShowLong, http://blog.csdn.net/showlong
//
// Date Created: 2009-10-15
//
// Update Date :            
//
// Copyright (c) Fuel4D (http://www.fuel4d.com), All rights reserved.
//
//----------------------------------------------------------------
#pragma once


class FAPI FUI_ScrollBarEx : public FUI_ScrollBar
{
    FUI_DECLARE_CLASS(FUI_ScrollBarEx)

public:
    FUI_ScrollBarEx(EF_UI_WIDGET_TYPE t = eUWT_ScrollBarEx);
    virtual void Render(EF_UI_RENDER_LAYER layer);
    virtual void UpdateRect();
    virtual bool IsChild(FUI_Object* pChild);
    virtual int GetUpHeight();
    virtual int GetDownHeight();
    virtual bool OnMouseMove(funit nX, funit nY);
    virtual bool OnLButtonDown(funit nX, funit nY);
    virtual bool OnLButtonUp(funit nX, funit nY);

    // 获取部分控件数据
    FINLINE FUI_Button& GetTopB(){ return uTop; }
    FINLINE FUI_Button& GetBottomB(){ return uBottom; }

public:
    virtual void InitUIData(FUI_Object* father, fuWidgetBase* pData, FUI_Layout* layout);

protected:
    fuWidgetScrollBarEx* pScrollExData;  // 控件数据地址
    FUI_Button uTop;
    FUI_Button uBottom;
};